package entity

type ReportOption func(*Report)

func New(opts ...ReportOption) ReportEntity {
	r := &Report{}
	r.Update(opts...)
	return r
}

func (r *Report) Update(opts ...ReportOption) {
	for _, opt := range opts {
		opt(r)
	}
}

func WithID(id uint) ReportOption {
	return func(r *Report) {
		r.ID = id
	}
}

func WithClassID(classID uint) ReportOption {
	return func(r *Report) {
		r.ClassID = classID
	}
}

func WithExperimentID(experimentID uint) ReportOption {
	return func(r *Report) {
		r.ExperimentID = experimentID
	}
}

func WithStudent(student string) ReportOption {
	return func(r *Report) {
		r.Student = student
	}
}

func WithStatus(status uint) ReportOption {
	return func(r *Report) {
		r.Status = status
	}
}
